//
//  SectionSelectorController.m
//  Aksharalu
//
//  Created by surya gaddipati on 5/22/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "SectionSelectorController.h"
#import "VowelsViewController.h"
#import "DetailViewController.h"

@implementation SectionSelectorController
@synthesize navController,vowelsController,detailViewController;


-(void)selectDetail : (NSInteger) tag{

	[navController pushViewController:detailViewController	animated:YES];
	[detailViewController setTitle:@"AA"];
	[detailViewController selectDetail:tag];
	
}

- (IBAction)selectSection:(id)sender{
	UIButton *clickedButton = (UIButton*) sender;
//	NSString * selectedView = [clickedButton titleForState:UIControlStateNormal];
    if(vowelsController == nil){
		vowelsController  = [[VowelsViewController alloc] initWithNibName:@"VowelsView"	bundle:nil]; 
		[vowelsController setTitle:@"Vowels"];
		vowelsController.selectionController = self;
	}
	[navController pushViewController:vowelsController	animated:YES];
	
	//	[self changeViewsOnTheScreen : [selectedView isEqual: @"Vowels"] ? vowelsView : consonantsView];
}

/*
// The designated initializer. Override to perform setup that is required before the view is loaded.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        // Custom initialization
    }
    return self;
}
*/




/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
}
*/

/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
    // Release anything that's not essential, such as cached data
}


- (void)dealloc {
    [super dealloc];
}


@end
